package 剑指offer;

/**
 * @ClassName _53_II_0_n_1中缺失的数字
 * @Description TODO
 * @Author 昝亚杰
 * @Date 2022/2/25 21:03
 * Version 1.0
 **/
public class _53_II_0_n_1中缺失的数字 {
    public int missingNumber(int[] nums) {
        int i = 0,j = nums.length -1;
        while (i < j){
            int m = (i + j) / 2;
            System.out.println(m);
            if(nums[m] <= m){
                i = m + 1;
            }else{
                j = m;
            }
        }
        return i;
    }
}
